package com.dong.abstractFactoryMode.service.factory.impl;

import com.dong.abstractFactoryMode.prepare.IIR;
import com.dong.abstractFactoryMode.service.factory.ICacheAdapter;

import java.util.concurrent.TimeUnit;

/**
 * @author DongJiaQi
 * @create 2022/12/20 14:03
 * @Description:
 */
public class IIRCacheAdapterImpl implements ICacheAdapter {
    private IIR iir = new IIR();
    @Override
    public String get(String key) {
        return iir.get(key);
    }

    @Override
    public void set(String key, String value) {
        iir.set(key,value);
    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        iir.setExpire(key, value, timeout, timeUnit);
    }

    @Override
    public void del(String key) {
        iir.del(key);
    }
}
